{% extends "mobileadmin/mobile_jquery/base.html" %}
{% load i18n admin_modify adminmedia jqmobile_tags %} {# grp_csrf #}
{% block userlinks %}
{% url django-admindocs-docroot as docsroot %}
    {% if docsroot %}
        <li>
            <a href="{{ docsroot }}">{% trans 'Documentation' %}</a>
        </li>
    {% endif %}
    <li>
        <a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a>
    </li>
    <li>
        <a href="{{ root_path }}logout/">{% trans 'Log out' %}</a>
    </li>
{% endblock %}

{% block navbar %}
	{% get_breadcrumb request.path %}
{% endblock %}

{% comment %}
{% block breadcrumbs %}
    {% if not is_popup %}
        <div id="breadcrumbs">
             <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
             <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
             <a href="../">{{ original|truncatewords:"18" }}</a> &rsaquo;
             {% trans 'Change password' %}
        </div>
    {% endif %}
{% endblock %}
{% endcomment %}

{% block title %}{% trans 'Password change' %}{% endblock %}
{% block content-class %}content-grid{% endblock %}

{% block content %}
{# TODO: French translations alre all mixed up with change "MY" password form ... #}
{#<h1>{% trans 'Password change' %}</h1>#}
<form action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
    <h1>{% trans "Change password: " %} {{ original }}</h1>
    <div class="ui-bar ui-bar-e">
    	{% blocktrans with original.username as username %}Enter a new password for the user <strong>{{ username }}</strong>.{% endblocktrans %}
        {% if form.errors %}
   		 <p class="errornote">{% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} </p>{% endif %}
    </div>
    <table>        
    <fieldset class="module">
   		<div data-role="fieldcontain">
			<tr><td><label for="id_new_password1" class="required">{% trans 'New password:' %}</label></td>
			<td>{{ form.password1 }}{% if form.password1.errors %}</td><td>{{ form.password1.errors }}{% endif %}</td></tr>
		<div>
		<div data-role="fieldcontain">	
			<tr><td><label for="id_new_password2" class="required">{% trans 'Password (again)' %}</label></td>
			<td>{{ form.password2 }}{% if form.password2.errors %}</td><td>{{ form.password2.errors }}{% endif %}</td></tr>
			<p class="help">{% trans 'Enter the same password as above, for verification.' %}</p>
		</div>
    </fieldset>
    </table>
    <fieldset class="ui-grid-a">
		<div class="ui-block-a"><button type="reset" data-theme="a">Cancel</button></div>
		<div class="ui-block-b"><button type="submit" data-theme="b">{% trans 'Change my password' %}</button></div>	   
	</fieldset>
</form>
{% endblock %}
